import 'package:safetymonitor/app/data/common/choice_bean.dart';
import 'package:safetymonitor/generated/json/base/json_field.dart';
import 'package:safetymonitor/generated/json/duty_schedule_config_entity.g.dart';
import 'dart:convert';
export 'package:safetymonitor/generated/json/duty_schedule_config_entity.g.dart';

@JsonSerializable()
class DutyScheduleConfigEntity extends ChoiceBean {
  int? id = 0;
  int? companyId = 0;
  String? companyName = '';
  String? scheduleName = '';
  String? scheduleType = '';
  String? scheduleTypeCode = '';
  String? dutyStartTime = '';
  String? dutyEndTime = '';
  String? totalDuration = '';
  int? createTime = 0;

  DutyScheduleConfigEntity();

  factory DutyScheduleConfigEntity.fromJson(Map<String, dynamic> json) =>
      $DutyScheduleConfigEntityFromJson(json);

  Map<String, dynamic> toJson() => $DutyScheduleConfigEntityToJson(this);

  @override
  String toString() {
    return jsonEncode(this);
  }

  @override
  String getId() {
    return '$id';
  }

  @override
  String getShowName() {
    return scheduleName ?? '';
  }
}
